package com.zuowei.ycy.user.adapter;

import android.content.Context;
import android.view.View;

import com.and.yzy.frame.adapter.AdapterCallback;
import com.and.yzy.frame.adapter.CommonAdapter;
import com.and.yzy.frame.adapter.ViewHolder;
import com.zuowei.ycy.R;
import com.zuowei.ycy.user.domain.BusinessSortInfo;

import java.util.List;


/**
 * 无分类商品的adapter
 */
public class BuinessNoSortAdapter extends CommonAdapter<BusinessSortInfo> {

    private AdapterCallback mAdapterCallback;
    public BuinessNoSortAdapter(Context context, List<BusinessSortInfo> mList, int itemLayoutId, AdapterCallback mAdapterCallback) {
        super(context, mList, itemLayoutId);
        this.mAdapterCallback=mAdapterCallback;
    }

    @Override
    public void convert(ViewHolder holder, final BusinessSortInfo item, int positon) {




        holder.setViewVisibility(R.id.title, View.GONE);

        //隐藏最后一个分割线
        if (item.isLast()) {

            holder.setViewVisibility(R.id.v_divier, View.INVISIBLE);
        } else {

            holder.setViewVisibility(R.id.v_divier, View.VISIBLE);
        }



    }
}
